<%@ page contentType="text/html; charset=UTF-8" %> 
<HTML>
<%@include file="/WEB-INF/content/public/head.jsp"%>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	
}
-->
</style>
<BODY bgcolor="#0a5c8e">
<DIV id=showmenu style="LEFT: 0px; WIDTH: 10px; POSITION: absolute; TOP: 221px; HEIGHT: 31px"><IMG
onmouseover="this.style.cursor='hand'" onclick=hidFrame() alt=隐藏菜单 src="${ctx}/images/main/main_41.gif" name=img1></DIV>

<SCRIPT language=javascript>
//显示/隐藏左边帧( 默认情况下为显示左边帧 )
var currentChoice = true;
arrow1=new Image;
arrow2=new Image;
arrow1.src="${ctx}/images/main/main_41.gif";
arrow2.src="${ctx}/images/main/main_41_1.gif";
if (currentChoice) {
	document.img1.src=arrow1.src;
	document.img1.alt="隐藏菜单";
} else {
    document.img1.src=arrow2.src;
    document.img1.alt="显示菜单";
}

function hidFrame(){  
	if(currentChoice){
		if (parent.setyou.cols=="168,10,*"){
			parent.setyou.cols="0,10,*";
			document.img1.src=arrow2.src;
			document.img1.alt="显示菜单";
		} else if (parent.setyou.cols=="168,10,*"){
			parent.setyou.cols="0,10,*";
			document.img1.src=arrow2.src;
			document.img1.alt="显示菜单";
		}
	} else { 
		if (parent.setyou.cols=="0,10,*"){
			parent.setyou.cols="168,10,*";
			document.img1.src=arrow1.src;
			document.img1.alt="隐藏菜单";
		} else if (parent.setyou.cols=="0,10,*"){
			parent.setyou.cols="168,10,*";
			document.img1.src=arrow1.src;
			document.img1.alt="隐藏菜单";
		}
	}
	currentChoice = !currentChoice;

}
</SCRIPT>

<SCRIPT>
var top=54;//滚动滑块的开始位置
var frameHeight=document.body.offsetHeight;//滚动滑块可滑动距离
var barH=31;//滚动滑块高度
var currentY = 54;//滚动滑块当前位置
var contentFrame = parent.leftFrame;//被滚动的框架
var curObj = null;

function dropIt() {
curObj = null;
}

function scrollByStep(step) {
	contentFrame.scrollBy(0,step);
	scrollbar.style.pixelTop = (contentFrame.document.body.scrollTop)/(contentFrame.document.body.scrollHeight-contentFrame.document.body.clientHeight)*(frameHeight-top-barH)+top;
	if(scrollbar.style.pixelTop < top ) scrollbar.style.pixelTop=top;
	if(scrollbar.style.pixelTop > frameHeight-barH) scrollbar.style.pixelTop = frameHeight-barH;
}

function CatchIt() {
curObj = event.srcElement;
if (curObj.id!="bar") {curObj=null;return;}
if (curObj == null) { return;}
scrollbar.style.pixelTop = scrollbar.offsetTop;
currentX = (event.clientX + document.body.scrollLeft);
currentY = (event.clientY + document.body.scrollTop);
}

function moveIt() {
if (curObj == null) { return;}
if (curObj.id != "bar") { return;}
if (event.button!=1) {dropIt();return;}
newY = (event.clientY + document.body.scrollTop);
distanceY = (newY - currentY);
currentY = newY;
scrollbar.style.pixelTop += distanceY;
if(scrollbar.style.pixelTop < top) scrollbar.style.pixelTop = top;
scrollIt();
event.returnValue = false;
}
function scrollIt(){
	if(scrollbar.style.pixelTop < top ) scrollbar.style.pixelTop=top;
	if(scrollbar.style.pixelTop > frameHeight-barH) scrollbar.style.pixelTop = frameHeight-barH;
	sfTop=((scrollbar.style.pixelTop-top)/(frameHeight-barH-top))*(contentFrame.document.body.scrollHeight-contentFrame.document.body.clientHeight);
	contentFrame.scrollTo(0,sfTop);//滚动实现
}
document.onmousedown = CatchIt;
document.onmousemove = moveIt;
document.onmouseup = dropIt;
/*
	注意：
	滚动滑块的id为“bar”；并且放在id为“scrollbar”的层里。
*/
</script>

</BODY>
</HTML>
